<?php


namespace app\index\validate;


use think\Validate;

class Vendor extends Validate
{
    protected $rule = [
        ['id','require|number','id不能为空|id必须为数字'],
        ['company','require','供应商名不能为空'],
        ['telephone','require','联系电话不能为空'],
        ['address','require','地址不能为空'],
    ];

    protected $scene = [
        'create'  =>  ['company','telephone','address'],
        'save'  =>  ['id','telephone'],
    ];

}